package com.uujava.minibox.ui.cartoon.pulse;
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;

public class PulseFieldDemo extends JFrame {
	private static final long serialVersionUID = 3306289611775056373L;

	public PulseFieldDemo() {
		super("PulseField Demo");

		add(buildPulsatingField());
		setDefaultCloseOperation(EXIT_ON_CLOSE);

		pack();
		setLocationRelativeTo(null);
	}

	private JPanel buildPulsatingField() {
		JLabel field = new JLabel("hello");

		Pulse pulse = new Pulse();
		pulse.setBuildPulsating(field);
		pulse.Start();

		JPanel panel = new JPanel(new FlowLayout());
		panel.add(field);
		panel.add(new JButton("OK"));
		panel.add(new JButton("Cancel"));
		return panel;
	}

	public static void main(String[] args) {

		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				new PulseFieldDemo().setVisible(true);
			}
		});
	}
}
